home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source2.lha / Source / 3rdParty / Triton.mod < prev    next >
Encoding:
Text File  |  1995-01-24  |  19.7 KB  |  455 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Triton.mod $
  4.   Description: Interface to triton.library
  5.  
  6.    Created by: Helmuth Ritzer
  7.     $Revision: 1.0 $
  8.       $Author: hr $
  9.         $Date: 1995/01/21 16:06:42 $
  10.  
  11.   This is a modified version of the interface module for
  12.   AmigaOberon done by Peter Fröhlich.
  13.  
  14.   This release contains no translations of the C macros.
  15.  
  16. ***************************************************************************)
  17.  
  18. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  19. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  20. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  21.  
  22. MODULE [2] Triton;
  23.  
  24. IMPORT
  25.   SYS := SYSTEM, Kernel, e := Exec, u := Utility, gfx := Graphics,
  26.   i := Intuition, gt := GadTools, w := Workbench;
  27.  
  28.  
  29. (*****************************************************************************)
  30.  
  31. CONST
  32.  
  33.   tritonName *  = "triton.library";
  34.  
  35.  
  36. (*****************************************************************************)
  37.  
  38. TYPE
  39.   MessagePtr*    = POINTER TO Message;
  40.   AppPtr*        = POINTER TO App;
  41.   DimensionsPtr* = POINTER TO Dimensions;
  42.   ProjectPtr*    = POINTER TO Project;
  43.  
  44. (* --- The Triton message --- *)
  45.  
  46.   Message* = RECORD
  47.     project-   : ProjectPtr; (* The project which triggered the message       *)
  48.     id-        : e.ULONG;    (* The object's ID (where appropriate)           *)
  49.     class-     : e.ULONG;    (* The Triton message class                      *)
  50.     data-      : e.ULONG;    (* The class-specific data                       *)
  51.     code-      : e.ULONG;    (* \ Currently only used                         *)
  52.     qualifier- : e.ULONG;    (* / by TRMS_KEYPRESSED                          *)
  53.     seconds-   : e.ULONG;    (* \ Copy of system clock time (Only where       *)
  54.     micros-    : e.ULONG;    (* / available! If not set, trm_Seconds is NULL) *)
  55.   END;
  56.  
  57. (* --- The Application Structure --- *)
  58.  
  59.   App* = RECORD (* This structure is PRIVATE! *)
  60.     memPool  : e.ADDRESS;    (* The memory pool    *)
  61.     bitMask  : e.LONGBITS;   (* Bits to Wait() for *)
  62.     name     : e.STRPTR;     (* Unique name        *)
  63.     longName : e.STRPTR;     (* User-readable name *)
  64.     info     : e.STRPTR;     (* Info string        *)
  65.     version  : e.STRPTR;     (* Version            *)
  66.     release  : e.STRPTR;     (* Release            *)
  67.     date     : e.STRPTR;     (* Compilation date   *)
  68.     appPort  : e.MsgPortPtr; (* AppMessage port    *)
  69.   END;
  70.  
  71. (* --- The Dimensions Structure --- *)
  72.  
  73.   Dimensions* = RECORD
  74.     left*     : e.UWORD;            (* Left                  *)
  75.     top*      : e.UWORD;            (* Top                   *)
  76.     width*    : e.UWORD;            (* Width                 *)
  77.     height*   : e.UWORD;            (* Height                *)
  78.     left2*    : e.UWORD;            (* Left                  *)
  79.     top2*     : e.UWORD;            (* Top                   *)
  80.     width2*   : e.UWORD;            (* Width                 *)
  81.     height2*  : e.UWORD;            (* Height                *)
  82.     zoomed*   : e.BOOL;             (* Window zoomed?        *)
  83.     reserved* : ARRAY 3 OF e.UWORD; (* For future expansions *)
  84.   END;
  85.  
  86. (* --- The Project Structure --- *)
  87.  
  88.   Project* = RECORD (* This structure is PRIVATE! *)
  89.     app                  : AppPtr;            (* Our application *)
  90.     screen               : i.ScreenPtr;       (* Our screen, always valid *)
  91.     lockedPubScreen      : i.ScreenPtr;       (* Only valid if we're using a PubScreen *)
  92.     window               : i.WindowPtr;       (* The window *)
  93.     id                   : e.ULONG;           (* The window ID *)
  94.     appWindow            : w.AppWindowPtr;    (* AppWindow for icon dropping *)
  95.     idcmpFlags           : e.ULONG;           (* The IDCMP flags *)
  96.     flags                : e.ULONG;           (* Triton window flags *)
  97.     newMenu              : gt.NewMenuPtr;     (* The newmenu stucture built by Triton *)
  98.     newMenuSize          : e.ULONG;           (* The number of menu items in the list *)
  99.     menu                 : i.MenuPtr;         (* The menu structure *)
  100.     nextSelect           : e.UWORD;           (* The next selected menu item    *)
  101.     visualInfo           : e.ADDRESS;         (* The VisualInfo of our window *)
  102.     drawInfo             : i.DrawInfoPtr;     (* The DrawInfo of the screen *)
  103.     dimensions           : DimensionsPtr;     (* User-supplied dimensions *)
  104.     windowStdHeight      : e.ULONG;           (* The standard height of the window *)
  105.     leftBorder           : e.ULONG;           (* The width of the left window border *)
  106.     rightBorder          : e.ULONG;           (* The width of the right window border *)
  107.     topBorder            : e.ULONG;           (* The height of the top window border *)
  108.     bottomBorder         : e.ULONG;           (* The height of the bottom window border *)
  109.     innerWidth           : e.ULONG;           (* The inner width of the window *)
  110.     innerHeight          : e.ULONG;           (* The inner height of the window *)
  111.     zipDimensions        : ARRAY 4 OF e.WORD; (* The dimensions for the zipped window *)
  112.     aspectFixing         : e.UWORD;           (* Pixel aspect correction factor *)
  113.     objectList           : e.MinList;         (* The list of display objects *)
  114.     menuList             : e.MinList;         (* The list of menus *)
  115.     idList               : e.MinList;         (* The ID linking list (menus & objects) *)
  116.     memPool              : e.ADDRESS;         (* The memory pool for the lists *)
  117.     hasObjects           : e.BOOL;            (* Do we have display objects ? *)
  118.     propAttr             : gfx.TextAttrPtr;   (* The proportional font attributes *)
  119.     fixedWidthAttr       : gfx.TextAttrPtr;   (* The fixed-width font attributes *)
  120.     propFont             : gfx.TextFontPtr;   (* The proportional font *)
  121.     fixedWidthFont       : gfx.TextFontPtr;   (* The fixed-width font *)
  122.     openedPropFont       : e.BOOL;            (* \ Have we opened the fonts ? *)
  123.     openedFixedWidthFont : e.BOOL;            (* / *)
  124.     totalPropFontHeight  : e.UWORD;           (* Height of prop font incl. underscore *)
  125.     backfillType         : e.ULONG;           (* The backfill type *)
  126.     backfillHook         : u.HookPtr;         (* The backfill hook *)
  127.     gadToolsGadgetList   : i.GadgetPtr;       (* List of GadTools gadgets *)
  128.     prevGadget           : i.GadgetPtr;       (* Previous GadTools gadget *)
  129.     newGadget            : gt.NewGadgetPtr;   (* GadTools NewGadget *)
  130.     invisibleRequest     : i.RequesterPtr;    (* The invisible blocking requester *)
  131.     isUserLocked         : e.BOOL;            (* Project locked by the user? *)
  132.     currentID            : e.ULONG;           (* The currently keyboard-selected ID *)
  133.     isCancelDown         : e.BOOL;            (* Cancellation key pressed? *)
  134.     isShortcutDown       : e.BOOL;            (* Shortcut key pressed? *)
  135.     underscore           : e.UBYTE;           (* The underscore character *)
  136.     escClose             : e.BOOL;            (* Close window on Esc ? *)
  137.     delZip               : e.BOOL;            (* Zip window on Del ? *)
  138.     pubScreenFallBack    : e.BOOL;            (* Fall back onto default public screen ? *)
  139.     fontFallBack         : e.BOOL;            (* Fall back to topaz.8 ? *)
  140.     oldWidth             : e.UWORD;           (* Old window width *)
  141.     oldHeight            : e.UWORD;           (* Old window height *)
  142.   END;
  143.  
  144. CONST
  145.  
  146. (* --- Message classes --- *)
  147.  
  148.   msCloseWindow* = 1; (* The window should be closed *)
  149.   msError*       = 2; (* An error occured. Error code in trm_Data *)
  150.   msNewValue*    = 3; (* Object's value has changed. New value in trm_Data *)
  151.   msAction*      = 4; (* Object has triggered an action *)
  152.   msIconDropped* = 5; (* Icon dropped over window (ID=0) or DropBox. AppMessage* in trm_Data *)
  153.   msKeyPressed*  = 6; (* Key pressed. trm_Data contains ASCII code, trm_Code raw code and *)
  154.                                     (* trm_Qualifier contains qualifiers *)
  155. (* --- Triton error codes --- *)
  156.  
  157.   erOk*              = 0;  (* No error *)
  158.   erAllocMem*        = 1;  (* Not enough memory *)
  159.   erOpenWindow*      = 2;  (* Can't open window *)
  160.   erWindowTooBig*    = 3;  (* Window would be too big for screen *)
  161.   erDrawInfo*        = 4;  (* Can't get screen's DrawInfo *)
  162.   erOpenFont*        = 5;  (* Can't open font *)
  163.   erCreateMsgPort*   = 6;  (* Can't create message port *)
  164.   erInstallObject*   = 7;  (* Can't create an object *)
  165.   erCreateClass*     = 8;  (* Can't create a class *)
  166.   erNoLockPubScreen* = 9;  (* Can't lock public screen *)
  167.   erInvalid*         = 10; (* Invalid NewMenu structure -> probably a bug in Triton *)
  168.   erNoMem*           = 11; (* Not enough memory for menu creation *)
  169.   erOtherCreate*     = 12; (* Other error while creating the menus *)
  170.   erLayout*          = 13; (* GadTools can't layout the menus *)
  171.   erCreateContext*   = 14; (* Can't create gadget context *)
  172.   erMaxErrorNum      = 15; (* PRIVATE! *)
  173.  
  174. (* --- Tags for OpenWindow() --- *)
  175.  
  176. (* Window *)
  177.   wiTitle*              = (u.user+1);  (* STRPTR: The window title *)
  178.   wiFlags*              = (u.user+2);  (* See below for window flags *)
  179.   wiUnderscore*         = (u.user+3);  (* POINTER TO CHAR: The underscore for menu and gadget shortcuts *)
  180.   wiPosition*           = (u.user+4);  (* Window position, see below *)
  181.   wiCustomScreen*       = (u.user+5);  (* ScreenPtr *)
  182.   wiPubScreen*          = (u.user+6);  (* ScreenPtr, must have been locked! *)
  183.   wiPubScreenName*      = (u.user+7);  (* STRPTR, Triton is doing the locking *)
  184.   wiPropFontAttr*       = (u.user+8);  (* TextAttrPtr: The proportional font *)
  185.   wiFixedWidthFontAttr* = (u.user+9);  (* TextAttrPtr: The fixed-width font *)
  186.   wiBackfill*           = (u.user+10); (* The backfill type, see below *)
  187.   wiID*                 = (u.user+11); (* ULONG: The window ID *)
  188.   wiDimensions*         = (u.user+12); (* DimensionsPtr *)
  189.  
  190. (* Menus *)
  191.   mnTitle* = (u.user+101); (* STRPTR: Menu *)
  192.   mnItem*  = (u.user+102); (* STRPTR: Menu item *)
  193.   mnSub*   = (u.user+103); (* STRPTR: Menu subitem *)
  194.   mnFlags* = (u.user+104); (* See below for flags *)
  195.  
  196. (* General object attributes *)
  197.   atID*        = (u.user+150); (* The object's/menu's ID *)
  198.   atFlags*     = (u.user+151); (* The object's flags *)
  199.   atValue*     = (u.user+152); (* The object's value *)
  200.   atText*      = (u.user+153); (* The object's text *)
  201.   atDisabled*  = (u.user+154); (* Disabled object? *)
  202.   atBackfill*  = (u.user+155); (* Backfill pattern *)
  203.   atMinWidth*  = (u.user+156); (* Minimum width *)
  204.   atMinHeight* = (u.user+157); (* Minimum height *)
  205.  
  206.   user* = (u.user+800); (* Add something to get your own IDs *)
  207.  
  208. (* Magic code *)
  209.   magicObjBeg* = (u.user+200); (* PRIVATE! *)
  210.   magicObjEnd* = (u.user+999); (* PRIVATE! *)
  211.   magicSpcBeg* = (u.user+900); (* PRIVATE! *)
  212.   magicSpcEnd* = (u.user+999); (* PRIVATE! *)
  213.  
  214. (* --- Window flags --- *)
  215.  
  216.   wiBackDrop*        = 000000001H; (* Create a backdrop borderless window *)
  217.   wiNoDragBar*       = 000000002H; (* Don't use a dragbar *)
  218.   wiNoDepthGadget*   = 000000004H; (* Don't use a depth-gadget *)
  219.   wiNOCloseGadget*   = 000000008H; (* Don't use a close-gadget *)
  220.   wiNoActivate*      = 000000010H; (* Don't activate window *)
  221.   wiNoEscClose*      = 000000020H; (* Don't send closeWindow when Esc is pressed *)
  222.   wiNoPScrFallback*  = 000000040H; (* Don't fall back onto default PubScreen *)
  223.   wiNoZipGadget*     = 000000080H; (* Don't use a zip-gadget *)
  224.   wiZipCenterTop*    = 000000100H; (* Center the zipped window on the title bar *)
  225.   wiNoMinTextWidth*  = 000000200H; (* Minimum window width not according to title text *)
  226.   wiNoSizeGadget*    = 000000400H; (* Don't use a sizing-gadget *)
  227.   wiNoFontFallback*  = 000000800H; (* Don't fall back to topaz.8 *)
  228.   wiNoDelZip*        = 000001000H; (* Don't zip the window when Del is pressed *)
  229.   wiSimpleRefresh*   = 000002000H; (* Use simple refresh instead of smart refresh *)
  230.   wiZipToCurrentPos* = 000004000H; (* Will zip the window at the current position (OS3.0+) *)
  231.   wiAppWindow*       = 000008000H; (* Create an AppWindow without using class_dropbox *)
  232.   wiActivateStrGad*  = 000010000H; (* Activate the first string gadget after opening the window *)
  233.  
  234.  
  235. (* --- Menu flags --- *)
  236.  
  237.   mnCheckIt*  = 000000001H; (* Leave space for a checkmark *)
  238.   mnChecked*  = 000000002H; (* Check the item (includes TRMF_CHECKIT) *)
  239.   mnDisabled* = 000000004H; (* Ghost the menu/item *)
  240.  
  241. (* --- Window positions --- *)
  242.  
  243.   wpDefault*       = 0;    (* Let Triton choose a good position *)
  244.   wpBelowTitlebar* = 1;    (* Left side of screen, below title bar *)
  245.   wpCenterTop*     = 1025; (* Top of screen, centered on the title bar *)
  246.   wpTopLeftScreen* = 1026; (* Top left corner of screen *)
  247.   wpCenterScreen*  = 1027; (* Centered on the screen *)
  248.   wpCenterDisplay* = 1028; (* Centered on the currently displayed clip *)
  249.   wpMousePointer*  = 1029; (* Under the mouse pointer *)
  250.   wpMagic          = 1024; (* PRIVATE! *)
  251.  
  252. (* --- Backfill types --- *)
  253.  
  254.   bfWindowBack*       = 0;  (* Window backfill colors *)
  255.   bfRequesterBack*    = 1;  (* Requester backfill colors *)
  256.   bfNone*             = 2;  (* No backfill (= Fill with BACKGROUNDPEN) *)
  257.   bfShine*            = 3;  (* Fill with SHINEPEN *)
  258.   bfShineShadow*      = 4;  (* Fill with SHINEPEN + SHADOWPEN *)
  259.   bfShineFill*        = 5;  (* Fill with SHINEPEN + FILLPEN *)
  260.   bfShineBackground*  = 6;  (* Fill with SHINEPEN + BACKGROUNDPEN *)
  261.   bfShadow*           = 7;  (* Fill with SHADOWPEN *)
  262.   bfShadowFill*       = 8;  (* Fill with SHADOWPEN + FILLPEN *)
  263.   bfShadowBackground* = 9;  (* Fill with SHADOWPEN + BACKGROUNDPEN *)
  264.   bfFill*             = 10; (* Fill with FILLPEN *)
  265.   bfFillBackground*   = 11; (* Fill with FILLPEN + BACKGROUNDPEN *)
  266.  
  267. (* --- Display Object flags --- *)
  268.  
  269. (* General flags *)
  270.   ofRaised* = 000000001H; (* Raised object *)
  271.   ofHoriz*  = 000000002H; (* Horizontal object \ Works automatically *)
  272.   ofVert*   = 000000004H; (* Vertical object   / in groups *)
  273.  
  274. (* Text flags *)
  275.   txNoUnderscore* = 000000100H; (* Don't interpret underscores *)
  276.   txHighlight*    = 000000200H; (* Highlight text *)
  277.   tx3D*           = 000000400H; (* 3D design *)
  278.   txBold*         = 000000800H; (* Softstyle 'bold' *)
  279.   txTitle*        = 000001000H; (* A title (e. of a group) *)
  280.  
  281. (* --- Menu entries --- *)
  282.  
  283.   menuBarLabel* = -1; (* A barlabel instead of text *)
  284.  
  285. (* --- Tags for CreateApp() --- *)
  286.  
  287.   caName*     = (u.user+1);
  288.   caLongName* = (u.user+2);
  289.   caInfo*     = (u.user+3);
  290.   caVersion*  = (u.user+4);
  291.   caRelease*  = (u.user+5);
  292.   caDate*     = (u.user+6);
  293.  
  294. (* --- Tags for EasyRequest() --- *)
  295.  
  296.   ezReqPos*      = (u.user+1);
  297.   ezLockProject* = (u.user+2);
  298.   ezReturn*      = (u.user+3);
  299.   ezTitle*       = (u.user+4);
  300.   ezActivate*    = (u.user+5);
  301.  
  302. (* --- Default classes, attributes and flags --- *)
  303.  
  304. (* Classes *)
  305.   obButton*   = (u.user+305); (* A BOOPSI button gadget *)
  306.   obCheckBox* = (u.user+303); (* A checkbox gadget *)
  307.   obCycle*    = (u.user+310); (* A cycle gadget *)
  308.   obFrameBox* = (u.user+306); (* A framing box *)
  309.   obDropBox*  = (u.user+312); (* An icon drop box *)
  310.   grHoriz*    = (u.user+201); (* Horizontal group, see below for types *)
  311.   grVert*     = (u.user+202); (* Vertical group, see below for types *)
  312.   grEnd*      = (u.user+203); (* End of a group *)
  313.   obLine*     = (u.user+301); (* A simple line *)
  314.   obPalette*  = (u.user+307); (* A palette gadget *)
  315.   obScroller* = (u.user+309); (* A scroller gadget *)
  316.   obSlider*   = (u.user+308); (* A slider gadget *)
  317.   obSpace*    = (u.user+901); (* The spaces class *)
  318.   obString*   = (u.user+311); (* A string gadget *)
  319.   obText*     = (u.user+304); (* A line of text *)
  320.   obListview* = (u.user+313); (* A listview gadget *)
  321.   obProgress* = (u.user+314); (* A progress indicator *)
  322.  
  323. (* Button *)
  324.   buReturnOk*  = 000010000H; (* <Return> answers the button *)
  325.   buEscOk*     = 000020000H; (* <Esc> answers the button *)
  326.   buShifted*   = 000040000H; (* Shifted shortcut only *)
  327.   buUnshifted* = 000080000H; (* Unshifted shortcut only *)
  328.   btText*      = 0;          (* Text button *)
  329.   btGetFile*   = 1;          (* GetFile button *)
  330.   btGetDrawer* = 2;          (* GetDrawer button *)
  331.   btGetEntry*  = 3;          (* GetEntry button *)
  332.  
  333. (* Group *)
  334.   grPropShare*  = 000000000H; (* Divide objects proportionally *)
  335.   grEqualShare* = 000000001H; (* Divide objects equally *)
  336.   grPropSpaces* = 000000002H; (* Divide spaces proportionally *)
  337.   grArray*      = 000000004H; (* Top-level array group *)
  338.   grAlign*      = 000000008H; (* Align resizeable objects in secondary dimension *)
  339.   grCenter*     = 000000010H; (* Center unresizeable objects in secondary dimension *)
  340.   grFixHoriz*   = 000000020H; (* Don't allow horizontal resizing *)
  341.   grFixVert*    = 000000040H; (* Don't allow vertical resizing *)
  342.  
  343. (* Scroller *)
  344.   scTotal*   = (u.user+1504);
  345.   scVisible* = (u.user+1505);
  346.  
  347. (* Slider *)
  348.   slMin* = (u.user+1502);
  349.   slMax* = (u.user+1503);
  350.  
  351. (* Space *)
  352.   stNone*   = 1; (* No space *)
  353.   stSmall*  = 2; (* Small space *)
  354.   stNormal* = 3; (* Normal space (default) *)
  355.   stBig*    = 4; (* Big space *)
  356.  
  357. (* Listview *)
  358.   lvTop*          = (u.user+1506);
  359.   lvReadOnly*     = 000010000H;    (* A read-only list *)
  360.   lvSelect*       = 000020000H;    (* You may select an entry *)
  361.   lvShowSelected* = 000040000H;    (* Selected entry will be shown *)
  362.   lvNoCursorKeys* = 000080000H;    (* Don't use arrow keys *)
  363.   lvNoNumPadKeys* = 000100000H;    (* Don't use numeric keypad keys *)
  364.   lvFWFont*       = 000200000H;    (* Use the fixed-width font *)
  365.  
  366. VAR
  367.  
  368. VAR
  369.  
  370.   base *: e.LibraryPtr;
  371.   supportApp : AppPtr;
  372.  
  373.  
  374. (** --- Library Functions ------------------------------------------------ *)
  375.  
  376. PROCEDURE OpenProject* [base,-30]
  377.   ( app[9]: AppPtr; tagList[8]: ARRAY OF u.TagItem )
  378.   : ProjectPtr;
  379. PROCEDURE OpenProjectTags* [base,-30]
  380.   ( app[9]: AppPtr; tag[8]..: u.Tag )
  381.   : ProjectPtr;
  382. PROCEDURE CloseProject*      [base,-36]
  383.   ( project[8]: ProjectPtr );
  384. PROCEDURE FirstOccurance* [base,-42]
  385.   ( ch[0]: e.UBYTE; str[8]: e.STRPTR )
  386.   : e.LONG;
  387. PROCEDURE NumOccurances* [base,-48]
  388.   ( ch[0]: e.UBYTE; str[8]: e.STRPTR )
  389.   : e.LONG;
  390. PROCEDURE GetErrorString* [base,-54]
  391.   ( num[0]: e.UWORD): e.STRPTR;
  392. PROCEDURE CloseWindowSafely* [base,-126]
  393.   ( win[8]: i.WindowPtr );
  394. PROCEDURE GetMsg* [base,-108]
  395.   ( app[9]: AppPtr )
  396.   : MessagePtr;
  397. PROCEDURE ReplyMsg* [base,-114]
  398.   ( msg[9]: MessagePtr );
  399. PROCEDURE Wait* [base,-120]
  400.   ( app[9]: AppPtr; otherbits[0]: e.ULONG )
  401.   : e.ULONG;
  402. PROCEDURE SetAttribute* [base,-60]
  403.   ( prj[8]: ProjectPtr; id[0]: e.ULONG; attr[1]: e.ULONG; value[2]: e.ULONG );
  404. PROCEDURE GetAttribute* [base,-66]
  405.   ( prj[8]: ProjectPtr; id[0]: e.ULONG; attr[1]: e.ULONG )
  406.   : e.ULONG;
  407. PROCEDURE LockProject* [base,-72]
  408.   ( prj[8]: ProjectPtr );
  409. PROCEDURE UnlockProject* [base,-78]
  410.   ( prj[8]: ProjectPtr );
  411. PROCEDURE AutoRequest* [base,-84]
  412.   ( app[9]: AppPtr; lockProject[8]: ProjectPtr; requestTRWindowTags[10]: ARRAY OF u.TagItem )
  413.   : e.ULONG;
  414. PROCEDURE AutoRequestTags* [base,-84]
  415.   ( app[9]: AppPtr; lockProject[8]: ProjectPtr; tag[10]..: u.Tag )
  416.   : e.ULONG;
  417. PROCEDURE EasyRequest* [base,-90]
  418.   ( app[9]: AppPtr; bodyFmt[10]: e.STRPTR; gadFmt[11]: e.STRPTR; tagList[8]: ARRAY OF u.TagItem )
  419.   : e.ULONG;
  420. PROCEDURE EasyRequestTags* [base,-90]
  421.   ( app[9]: AppPtr; bodyFmt[10]: e.STRPTR; gadFmt[11]: e.STRPTR; tag[8]..: u.Tag )
  422.   : e.ULONG;
  423. PROCEDURE CreateApp* [base,-96]
  424.   ( appTags[9]: ARRAY OF u.TagItem )
  425.   : AppPtr;
  426. PROCEDURE DeleteApp* [base,-102]
  427.   ( app[9]: AppPtr );
  428. PROCEDURE CreateAppTags* [base,-96]
  429.   ( appTags[9]..: u.Tag )
  430.   : AppPtr;
  431.  
  432. (* I'm not sure where this call belongs. [phf] *)
  433. (*
  434. extern BOOL                __saveds __asm  TR_AddClass(register __d0 ULONG tag, register __a0 ULONG ( *dispatcher)());
  435. *)
  436.  
  437.  
  438. (*--- Library Base variable --------------------------------------------*)
  439.  
  440. <*$LongVars-*>
  441.  
  442. (*------------------------------------*)
  443. PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
  444.  
  445. BEGIN (* CloseLib *)
  446.   IF base # NIL THEN e.CloseLibrary (base) END
  447. END CloseLib;
  448.  
  449. BEGIN
  450.   (* supportApp is not used currently *)
  451.   supportApp := NIL;
  452.  
  453.   base := e.OpenLibrary (tritonName, 0);
  454.   IF base # NIL THEN Kernel.SetCleanup (CloseLib) END;
  455. END Triton.